#include "CClient.h"

#define  TIMERID_BACK_RECONNECT	(0xFF9998)

void CClient::StartReconnectTimer(int time_)
{
	StartTimer(TIMERID_BACK_RECONNECT, time_);
}

int CClient::OnBYTimeOut(int Timerid)
{
	switch (Timerid)
	{
	case TIMERID_BACK_RECONNECT:
		return Reconnect();
		break;
	default:
		break;
	}
	return 0;
}

int CClient::Reconnect()
{
	int ret = 0;
	if (!IsConnected())
	{
		ret = Connect();
	}

	return ret;
}